import java.io.*;
import java.util.*;

import datastr.*;
import preprocessing.*;

public class Driver {
	
	public static HashMap<Coordinate,ArrayList<Fingerprint>> globalHash;
	
	public static void main(String args[]) throws IOException
	{
		//populate the dataset from any file
		Dataset d= new Dataset();
		populateDataset(d);
		// now we have allthe fingerprints in our dataset...
		//do the preprocessing
		//for eachdataset populate the geometric hashmaps
		int l = d.dataset.size();
		for(int i=0;i<l;i++)
		{
			new GetGHash(d.dataset.get(i),globalHash);
		}
		//for each of the fingerprints we have the pre-computed modified data stored
		// we have already hashed everything into GlobalHashhashmap.
		double demo_x=1.1,demo_y=2.2;
		Fingerprint test = new Fingerprint();
		
		match(test);
		
	}
	
	static void match(Fingerprint test)
	{
		// we have the hashmap with all points
		//get the modified coordinates of the test coordinate
		GetGHash ggh = new GetGHash(test);
		HashMap<Coordinate,ArrayList<Fingerprint>> testHash = new HashMap<Coordinate,ArrayList<Fingerprint>> ();
		ggh.populateHash(testHash);
		//we now have everything
		//get the ones with max scores now
		get_max_scoring_candidates(testHash,globalHash);
	}
	
	static void get_max_scoring_candidates(HashMap<Coordinate,ArrayList<Fingerprint>> testHash, HashMap<Coordinate,ArrayList<Fingerprint>> globalHash)
	{
		//in this function we compare the 2 hashmaps and based on each common match,
		//increment the score of all the Fingerprints in the value field of the  hashmap
		//Top scorers would the FINAL OUTPUT 
	}
	
	static void populateDataset(Dataset d)
	{
		//d.dataset.add(Fingerprint);
	}

}
